package com.e.ego.dialog

import android.app.Dialog
import android.content.Context
import android.view.LayoutInflater
import android.view.View

import com.e.ego.R


/**
 * Created by lxy on 2016/8/29 11:58.
 */
abstract class EDialog(context: Context) : Dialog(context,  R.style.style_dialog) {

    protected abstract fun layout(): Int
    protected abstract fun onDialogCreated(context: Context)

    init {
        val view = LayoutInflater.from(context).inflate(layout(), null)
        setContentView(view)
        onDialogCreated(context)
    }

}
